# coding=utf-8
import stringold, random

# 激活码中的字母和数字
field = stringold.letters + stringold.digits


# 获得4个子母河数字的随机组合
def getRandom():
    return ''.join(random.sample(field, 4))


# 生成的每个激活码中有几组
def concatenate(group):
    return '-'.join(getRandom() for i in range(group))


# 生成几组激活码
def generate(n):
    return [concatenate(4) for i in range(4)]


# 默认的内置属性'__name__'值为'__main__',在别的模块中import后值为不带后缀名的文件名'
# import random_main
# print  ran#dom_main.__name__

if __name__ == '__main__':
    print generate(10)
# print  getRandom()
# print  concatenate(5)
# print  generate(10)
